precision mediump float;
uniform sampler2D u_texture;
varying vec2 v_uv;

const float blurSize = 1.0/512.0; 

void main(void)
{
   vec4 sum = vec4(0.0);
   float cnt = 0.0;
	for(float i=-2.0;i<=2.0;i++)
	{
		for(float j=-2.0;j<=2.0;j++)
		{
			cnt += 5.0 - (abs(i) + abs(j));
		}
	}
 
	for(float i=-2.0;i<=2.0;i++)
	{
		for(float j=-2.0;j<=2.0;j++)
		{
			sum += texture2D(u_texture, vec2(v_uv.x + i * blurSize, v_uv.y + j * blurSize)) * ((5.0 - (abs(i) + abs(j))) / cnt);
		}
	}

   gl_FragColor = sum;
}